package com.csw.springd.mapper;

import com.csw.springd.pojo.Table1;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface TestMapper {

    @Select("select * from table1 where num=#{id}")
    Table1 findTable1FromId(Integer id);

    @Insert("insert into table1 values(#{num},#{name},#{created})")
    void insertIntoTable1(Table1 table1);

    @Select("select * from table1 where name like concat('%',#{name},'%')")
    List<Table1> findTable1ByName(Table1 table1);
}
